<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .nav{
            width: 600px;
            height: 60px;
            /* border: 1px solid red; */
            margin: 10px auto;
            background-color: darkturquoise;
        }

        ul{
        
            list-style: none;
            padding: 0;
            margin: 0;
        }

        ul li{
            width: 20%;
            height: 60px;
            float: left;
            text-align: center;
            line-height: 60px;
            position: relative;
        }

        ul li span{ 
            position: relative;
            z-index: 1;
        }

        ul li:hover::after{
            content: '';
            display: block;
            width: 110%;
            height: 110%;
            background-color: darkcyan;
            position: absolute;
            left: 0;
            top: -5%;
        }

        ul li:hover span{
            color: white;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <div class="nav">
        <ul>
            <li><span>首页</span></li>
            <li><span>web前端工程师</span></li>
            <li><span>Java架构师</span></li>
            <li><span>实战案例视频</span></li>
            <li><span>关于我们</span></li>
        </ul>
    </div>
</body>
</html>